{% extends "afcp/base.html" %}
{% comment %}
<!--
  Copyright (C) 2008 ZHENG Zhong <heavyzheng nospam-at gmail D0T com>
  - http://heavyz.blogspot.com/
  - http://buggarden.blogspot.com/

  Created on 2008-10-28.
  $Id: home.html 298 2008-12-11 18:10:46Z heavyzheng $
-->
{% endcomment %}

{% load i18n %}

{#------------------------------------------------------------------------------------------------#}

{% block html_head %}

<title>AFCP Home</title>

<link rel="stylesheet" type="text/css" media="screen" href="/static/afcp/stylesheets/home.css"/>
<link rel="stylesheet" type="text/css" media="screen" href="/static/afcp/stylesheets/block.css"/>

<style type="text/css"><!--
#header-wrapper {
  margin: 0 0 10px 0;
  padding: 0;
  width: 900px;
  height: 270px;
  background: #888888 url("/static/afcp/images/{{ banner_image.id }}.jpg") no-repeat top;
  border-width: 4px 0 4px 0;
  border-style: solid;
  border-color: #888888;
}
--></style>

{% include "afcp/google_ajax_feed_api.html" %}
{% include "afcp/feeds_aggregator.html" %}

<script type="text/javascript">//<![CDATA[

function initialize() {
    var aggregator = new FeedsAggregator();
    {% for feed in feeds %}
        aggregator.addFeed("{{ feed.feed_link }}");
    {% endfor %}
    aggregator.showEntries = 10;
    aggregator.feedsNodeId = "feeds";
    aggregator.loadAndRender();
}

$(document).ready( function() { initialize(); } );

//]]></script>

{% endblock %}{# html_head #}

{#------------------------------------------------------------------------------------------------#}

{% block header %}
<div class="banner-image">
  {% if banner_image.url and banner_image.title %}
    <a href="{{ banner_image.url }}" rel="external">{{ banner_image.title|escape }}</a>
  {% endif %}
  <br/>
  {{ banner_image.desc|default:""|escape }}
</div>
{% endblock %}{# header #}

{#------------------------------------------------------------------------------------------------#}

{% block navbar %}

<div class="center-navbar">
  <span class="navbar-entry"><a href="/afcp/static/about/">关于AFCP</a></span>
  <span class="navbar-entry"><a href="/afcp/static/todo/">生活在法国</a></span>
  <span class="navbar-entry"><a href="/afcp/static/todo/">怎样去中国</a></span>
  <span class="navbar-entry"><a href="/afcp/static/todo/">企业合作</a></span>
  <span class="navbar-entry"><a href="/afcp/static/todo/">校友名册</a></span>
  <span class="navbar-entry"><a href="/afcp/static/contact/">联系我们</a></span>
</div>

{% endblock %}{# navbar #}

{#------------------------------------------------------------------------------------------------#}

{% block sidebar_and_content %}

<div id="home-wrapper" class="container">

  <!-- left column ///////////////////////////////////////////////////////////////////////////// -->
  
  <div id="left-column">
  
    <div id="announcements" class="block">
      <div class="block-title"><a href="/afcp/announcements/">{% trans "Latest News" %}</a></div>
      {% for announcement in announcements %}
        <div class="entry">
          <div class="entry-title">
            <a href="/afcp/announcement/{{ announcement.key.id }}/">{{ announcement.title|escape }}</a>
          </div>
          <div class="entry-info">
            Posted by {{ announcement.author.nickname }} on {{ announcement.post_date|date:"Y-m-d" }}.
          </div>
          <div class="entry-content">
            {{ announcement.brief_content|escape }}
          </div>
        </div><!--/.entry-->
      {% endfor %}
      <div class="block-footer">
        <a href="/afcp/announcements/">more announcements</a>
        {% if user_.profile and user_.profile.is_editor %}
          | <a href="/afcp/post_announcement/">post a new announcement</a>
        {% endif %}
      </div><!--/.section-footer-->
    </div><!--/#announcements-->
    
    <div id="ecoles" class="block">
      <div class="block-title">{% trans "ParisTech Ecoles" %}</div>
      {% for ecole in ecoles %}
        <div class="entry">
          <!--img class="entry-image"
               src="/static/afcp/images/{{ ecole.acronym }}_logo_80x80.gif"
               alt="{{ ecole.acronym }} Logo"/-->
          <div class="entry-title">
            <a href="{{ ecole.website }}">{{ ecole.acronym }}</a>
          </div>
          <div class="entry-info">
            Web site:
            <a href="{{ ecole.website }}" rel="external">{{ ecole.website }}</a>
          </div>
          <div class="entry-content">
            {{ ecole.name|default:""|escape }}
          </div>
        </div><!--/.entry-->
      {% endfor %}
      <div class="block-footer">
        <a href="http://www.paristech.fr/">{% trans "ParisTech official web site" %}</a>
      </div>
    </div>

  </div><!--/#left-column-->
  
  <!-- right column //////////////////////////////////////////////////////////////////////////// -->
  
  <div id="right-column">
  
    <div id="planet" class="block">
      <div class="block-title"><a href="/afcp/planet/">AFCP {% trans "Buzz" %}!</a></div>
      <div id="feeds"></div>
      <div class="block-footer">
        <a href="/afcp/planet/">{% trans "more in planet AFCP" %}</a>
      </div>
    </div><!--/#feeds-->
  
  </div><!--/#right-column-->

</div><!--/#home-wrapper-->


{% endblock %}{# sidebar_and_content #}




